package jp.co.brilliantservice.app.openar.data;

import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.RectF;

public class ScreenItem {
	static public final int HIDE = 0;
	static public final int DISPLAY = 1;
	static public final int OUT = 2;
	public int mX;
	public int mY;
	public float mDx;
	public float mDy;
	public int mDuration = 150;
	public double mDistance = 0;

	public Rect mRect;
	public Bitmap mIcon = null;
	public int mIconWidth = 0;
	public int mIconHeight = 0;
	public int mTextWidth = -1;
	public RectF mFrameRect = null;

	private int mDisplay = DISPLAY;
	public synchronized void setIcon(Bitmap bitmap) {
		if (mIcon!=null) {
//			mIcon.recycle();
		}
		mIcon = bitmap;
		mIconWidth = mIcon.getWidth();
		mIconHeight = mIcon.getHeight();
	}
	public Bitmap getIcon() {
		return mIcon;
	}
	public synchronized void clearIcon() {
		if (mIcon!=null) {
//			mIcon.recycle();
			mIcon = null;
		}
	}
	public void setDisplay(int display) {
		mDisplay = display;
	}
	public boolean isDisplay() {
		return (mDisplay==HIDE?false:mDisplay==OUT?false:true);
	}
}
